<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>工序物料设计单查询</title>
    <link rel="shortcut icon" href="favicon.ico">
    <link href="/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="/css/animate.css" rel="stylesheet">
    <link href="/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="/bootstraptable/bootstrap-table.css" rel="stylesheet">
    <style>
        .text_no_border {
            border: none;
        }
    </style>
</head>
<body>
<div style="color: #0e9aef;margin: 20px;">您正在做的业务是：生产管理--工序物料设计--工序物料设计单查询</div>
<div class="container">
    <form id="manufacture_design_processInfoById_form" class="form-horizontal">
        <div class="form-group">
            <div class="col-md-4">
                <label class="control-label col-md-6">设计单编号：</label>
                <div class="col-md-6">
                    <input type="text" class="form-control text_no_border" readonly style="background-color: white"  id="designId">
                </div>
            </div>
            <div class="col-md-4">
                <label class="control-label col-md-6"> 其中审核状态：</label>
                <div class="col-md-6">
                    <input type="text" class="form-control text_no_border" readonly style="background-color: white"  id="designModuleTag">
                </div>
            </div>
            <div class="col-md-4" style="text-align: right">
                <button type="button" class="btn btn-default" onclick="history.back(-1);">返回</button>
            </div>

        </div>

        <div class="panel panel-default" style="margin-top: 5px;">
            <div class="page-heading">
                <h2 style="text-align: center; margin-top: 30px;">生产工序设计单</h2>
            </div>
            <div class="panel-body">
                <div class="form-group">
                    <div class="col-sm-6">
                        <label class="col-sm-4 control-label">产品名称：</label>
                        <div class="col-sm-8">
                            <input type="text" name="productName" id="productName"
                                   class="form-control text_no_border"
                                   style="background-color: white"
                                   readonly
                            >
                        </div>
                    </div>
                    <div class="col-sm-6">
                        <label class="col-sm-4 control-label">产品编号：</label>
                        <div class="col-sm-8">
                            <input type="text" name="productId" id="productId"
                                   class="form-control text_no_border"
                                   style="background-color: white"
                                   readonly>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                        <div class="col-sm-6">
                            <label class="col-sm-4 control-label">设计人：</label>
                            <div class="col-sm-8">
                                <input type="text" name="designer" id="designer"
                                       class="form-control text_no_border"
                                       style="background-color: white"
                                       readonly
                                >
                            </div>
                        </div>
                    </div>
                </div>
                <!--工序明细表格-->
                <table style="margin-top: 20px;" class="table table-bordered table-striped" data-toggle="table"
                       id="process_design_details_table">
                    <thead>
                    <tr>
                        <th data-field="detailsNumber">序号</th>
                        <th data-field="procedureName">工序名称</th>
                        <th data-field="procedureId">工序编号</th>
                        <th data-field="procedureDescribe">描述</th>
                        <th data-field="labourHourAmount">工时数</th>
                        <th data-field="subtotal">工时成本小计（元）</th>
                        <th data-field="moduleSubtotal">物料成本小计（元）</th>
                    </tr>
                    </thead>
                </table>

                <div class="form-group" style="margin-top: 20px;">
                    <div class="col-sm-6">
                        <label class="col-sm-4 control-label">工时总成本：</label>
                        <div class="col-sm-8">
                            <input type="text" name="costPriceSum" id="costPriceSum"
                                   class="form-control text_no_border"
                                   style="background-color: white"
                                   readonly
                            >
                        </div>
                    </div>
                    <div class="col-sm-6">
                        <label class="col-sm-4 control-label">物料总成本：</label>
                        <div class="col-sm-8">
                            <input type="text" name="moduleCostPriceSum" id="moduleCostPriceSum"
                                   class="form-control text_no_border"
                                   style="background-color: white"
                                   readonly
                            >
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-12">
                        <label class="col-sm-2 control-label">设计要求：</label>
                        <div class="col-sm-8">
                            <textarea rows="3" cols="100" class="form-control"
                                      style=" background-color: white;resize: none;border: none" name="procedureDescribe"
                                      id="procedureDescribe" readonly></textarea>
                        </div>
                    </div>
                </div>
                <div class="form-group" style="margin-top: 15px;">
                    <div class="col-sm-6">
                        <label class="col-sm-4 control-label">审核人：</label>
                        <div class="col-sm-8">
                            <input type="text" name="checker" id="checker"
                                   class="form-control text_no_border"
                                   style="background-color: white"
                                   readonly
                            >
                        </div>
                    </div>
                    <div class="col-sm-6">
                        <label class="col-sm-4 control-label">审核时间：</label>
                        <div class="col-sm-8">
                            <input type="text" name="checkTime" id="checkTime"
                                   class="form-control text_no_border"
                                   style="background-color: white"
                                   readonly
                            >
                        </div>
                    </div>
                </div>
                <div class="form-group">
                <div class="col-sm-12">
                    <label class="col-sm-2 control-label">审核意见：</label>
                    <div class="col-sm-8">
                            <textarea rows="3" cols="100" class="form-control"
                                      style=" background-color: white;resize: none;border: none" name="checkSuggestion"
                                      id="checkSuggestion" readonly></textarea>
                    </div>
                </div>
            </div>
            </div>

    </form>
</div>



<!-- 全局js -->
<script src="/js/jquery.min.js?v=2.1.4"></script>
<script src="/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="/js/plugins/layer/layer.min.js"></script>

<!-- 自定义js -->
<script src="/js/hAdmin.js?v=4.1.0"></script>
<script src="/js/currentTime.js"></script>

<!-- 第三方插件 -->
<script src="/js/plugins/pace/pace.min.js"></script>

<!--BootstrapTable-->
<script src="/bootstraptable/bootstrap-table.min.js"></script>
<script src="/bootstraptable/locale/bootstrap-table-zh-CN.min.js"></script>

<script>
   $(function (){
       let id=localStorage.getItem("id")
       $.post("/manufacture/process/getIdProcess",{"id":id},function (res){
           console.log(res)
           if (res.designModuleTag == "G002-0"){
               $("#manufacture_design_processInfoById_form #designModuleTag").val("等待").css("color", "#eea236")
               $("#manufacture_design_processInfoById_form #designId").val(res.designId).css("color", "#eea236")
           } else if (res.designModuleTag == "G002-1") {
               $("#manufacture_design_processInfoById_form #designModuleTag").val("设计").css("color", "blue")
               $("#manufacture_design_processInfoById_form #designId").val(res.designId).css("color", "blue")
           } else {
               $("#manufacture_design_processInfoById_form #designModuleTag").val("通过").css("color", "green")
               $("#manufacture_design_processInfoById_form #designId").val(res.designId).css("color", "green")
           }
           $("#manufacture_design_processInfoById_form #designer").val(res.designer)
           $("#manufacture_design_processInfoById_form #costPriceSum").val(res.costPriceSum)
           $("#manufacture_design_processInfoById_form #procedureDescribe").val(res.procedureDescribe)
           $("#manufacture_design_processInfoById_form #checker").val(res.checker)
           $("#manufacture_design_processInfoById_form #checkTime").val(formater(res.checkTime))
           $("#manufacture_design_processInfoById_form #productId").val(res.productId)
           $("#manufacture_design_processInfoById_form #productName").val(res.productName)
           $("#manufacture_design_processInfoById_form #moduleCostPriceSum").val(res.moduleCostPriceSum)
           $("#manufacture_design_processInfoById_form #checkSuggestion").val(res.checkSuggestion)
       })

       $.post("/manufacture/process/getByIdProcessDetails",{"id":id},function (res){
           for(let i=0;i<res.length;i++){
               $("#manufacture_design_processInfoById_form #process_design_details_table").bootstrapTable("append",res[i])
           }
       })
   })
</script>
</body>
</html>